package com.yt.app.api.vo;

import com.yt.app.core.model.UserContact;
import com.yt.order.api.model.Institution;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Description
 * <p>
 * </p>
 * DATE 2017/10/25.
 *
 * @author liujunshi.
 */
@ApiModel(value = "预约城市数据", description = "")
public class ToReserveCityVo {
    @ApiModelProperty(value = "城市")
    private String city;
    @ApiModelProperty(value = "机构")
    private List<InstitutionVo> institutions;

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public List<InstitutionVo> getInstitutions() {
        return institutions;
    }

    public void setInstitutions(List<InstitutionVo> institutions) {
        this.institutions = institutions;
    }

    public void addInstitution(Institution institution) {
        if(this.institutions == null){
            this.institutions = new ArrayList<InstitutionVo>();
        }
        InstitutionVo vo = new InstitutionVo();
        vo.setId(institution.getId());
        vo.setName(institution.getName());
        vo.setAddress(institution.getAddress());
        this.getInstitutions().add(vo);
    }
}
